//
//  InteractionCell.m
//  KG
//
//  Created by 林杰良 on 15/12/27.
//  Copyright © 2015年 august. All rights reserved.
//

#import "InteractionCell.h"

@implementation InteractionCell

- (void)awakeFromNib {
    // Initialization code
}

-(void)setIntroductionText:(NSString*)text{
    
    //获得当前cell高度
    
    CGRect frame = [self frame];
    
    //文本赋值
    
    self.infoter_text.text = text;
    
    //设置label的最大行数
    
    self.infoter_text.numberOfLines = 10;
    
    CGSize size = CGSizeMake(300, 1000);
    
    CGSize labelSize = [self.infoter_text.text sizeWithFont:self.infoter_text.font constrainedToSize:size lineBreakMode:NSLineBreakByClipping];
    
    self.infoter_text.frame = CGRectMake(self.infoter_text.frame.origin.x, self.infoter_text.frame.origin.y, labelSize.width, labelSize.height);
        
    //计算出自适应的高度
    
    frame.size.height = labelSize.height+100;

    self.frame = frame;
    
}





- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
